<?php

class WeixinMod extends ModBase
{

	public function __construct()
	{
		parent::__construct();

		$this->mysql = n_api('mysql')->cname('weixin');
		$this->api = n_api('weixin');
	}

	public function commend(){
		$this->_html("commend");
	}
	public function search(){
		$this->_html("search");
	}
	public function menu($current){
		$cate = $this->api->getCategories();
		//$categories = $this->weixin->getCategories();
		//print_r($cate);
		foreach($cate as $key=>$val){
			$rs['cateTree'][$val['first_category']][] = $val;
			$rs['index'][$val['norder']][$val['first_category']] = 0;
		}
		ksort($rs['index']);
		//print_r($rs);
		$rs['current'] = $current;
		$this->_html("menu",$rs);
	}
	public function lines(){

		$this->_html("lines");
	}
	public function competeList(){
		$this->_html("competeList");
	}
	public function imgTab(){
		
		$url[] = '/weixin/img/banner10.png';
		$url[] = '/weixin/img/banner11.png';
		$url[] = '/weixin/img/banner12.png';
		$this->_html("imgTab",$url);
	}
	
	public function __destruct(){
	}


}